package com.itheima.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Before;

@Slf4j
// @Component
// @Aspect
// @Order(3)
public class MyAspect4 {
    //前置通知
    @Before("execution(* com.itheima.*.*.DeptServiceImpl.*(*))")
    // @Before("execution(* com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
    // @Before("execution(public void com.itheima.service.impl.DeptServiceImpl.delete(java.lang.Integer))")
    // @Before("execution(* com.itheima.service.*.*(..))")
    public void before(){
        log.info("MyAspect4 -> before ...");
    }

    //后置通知
    @After("execution(* com.itheima.service.*.*(..))")
    public void after(){
        log.info("MyAspect4 -> after ...");
    }
}
